// Defines for use with Arduino functions
#include <IRremote.h>
#define clockpin   52 //13//52//SCK//CI//YELLOW
#define enablepin  53 //10//53//SS//EI//GREEN
#define latchpin    9 //9//9//9//LI//BLUE
#define datapin    51 //11//51//MOSI//DI//WHITE
#define CLKPORT PORTB
#define ENAPORT PORTB
#define LATPORT PORTH
#define DATPORT PORTB
#define CLKPIN  1
#define ENAPIN  0
#define LATPIN  6
#define DATPIN  2
#define Red_CODE 0x800F845B // Red on mce remote
#define Red_CODE1 0x800F045B
#define Green_CODE 0x800F845C// Green on mce remote
#define Green_CODE1 0x800F045C
#define Blue_CODE 0x800F845D // Blue on mce remote
#define Blue_CODE1 0x800F045D
#define Yellow_CODE 0x800F845E // Yellow on mce remote
#define Yellow_CODE1 0x800F045E
#define TeleText_CODE 0x800F845A // TeleText on mce remote
#define TeleText_CODE1 0x800F045A

int Ir_pin = 3;
int Power = 2;
int rcount=0; //number of times button was pressed

IRrecv irrecv(Ir_pin);
decode_results results;

unsigned long SB_CommandPacket;
int SB_CommandMode;
int SB_BlueCommand;
int SB_RedCommand;
int SB_GreenCommand;

// Define number of ShiftBrite modules & Channels
#define NumLEDs 11
#define Channels 16
//Channel order
//order is reversed, first byte is last module in the chain
//make sure bytes = NumLeds example 5 NumLeds (5,4,3,2,1)
byte channelorder[NumLEDs]={3,3,3,4,4};
int LEDChannels[NumLEDs][3] = {0};


void setup() 
{
  init_upStart();
}

void loop()
{
  //boblight();
  //RandomColours();
  //Tron();
  //Vu();
 // KRider();
  IrRemote();
} 


